﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MT4Trainer
{
    using System.Windows.Forms;

    public static class SafeInvokes
    {
        public static void SafeInvoke(this Control ctrl, Action cmd)
        {
            if (ctrl.InvokeRequired)
                ctrl.BeginInvoke(cmd);
            else
                cmd();
        }
    }
}